package io.github.biezhi.elves.model;

import io.github.biezhi.elves.common.Constants;
import io.github.biezhi.elves.utils.StringUtils;
import lombok.Data;

/**
 * 股权结构信息表
 *
 */
@Data
public class StockStructureInfo {
	//企业唯一id
	private String uniqueId;
	//主体身份代码
	private String pripid;
	//企业名称
	private String entname;
	//key值
	private String KeyNo;
	//企业名称
	private String Name;
	//父级key值
	private String parentKeyNo;
	//认缴金额
	private String SubConAmt;
	//股权比例
	private String FundedRatio;
	//最大等级
	private String MaxGrade;
	//等级
	private Integer Grade;
	//地市id
	private String cityId;
	
	public void setSubConAmt(String SubConAmt){
		SubConAmt = SubConAmt.replaceAll(Constants.REPLACE_CN, "");
		SubConAmt = StringUtils.isNullOrEmpty(SubConAmt)?"0":SubConAmt;
		this.SubConAmt = StringUtils.getReplaceStr(SubConAmt);
	}
	
	public void setGrade(Integer Grade){
		if(!StringUtils.isNullOrEmpty(this.MaxGrade)){
			this.Grade = Integer.parseInt(this.MaxGrade);
		}else{
			this.Grade = Grade;
		}
	}
}